﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;

namespace DCT.View
{
    internal class Util
    {
        public static T GetParentVisual<T>(DependencyObject dpo) where T : DependencyObject
        {
            while (dpo != null && !(dpo is T))
            {
                dpo = VisualTreeHelper.GetParent(dpo);
            }

            return dpo as T;
        }
    }
}
